package com.sys.SysDataView.controller;

import com.sys.SysDataView.domain.SysDataView;
import com.sys.SysDataView.service.SysDataViewService;
import com.sys.common.core.controller.BaseController;
import com.sys.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;


/**
 * 数字大屏Controller
 * 
 * @author ruoyi
 * @date 2025-09-03
 */
@RestController
@RequestMapping("/SysDataView/SysDataView")
public class SysDataViewController extends BaseController
{
    @Autowired
    private SysDataViewService sysDataViewService;

    /**
     * 获取统计数据（供前端数据大屏调用）
     */
    @PreAuthorize("@ss.hasPermi('SysDataView:SysDataView:list')")
    @GetMapping("/statistics")
    public AjaxResult getStatistics() {
        SysDataView statistics = sysDataViewService.getStatisticsNew();
        return AjaxResult.success(statistics);
    }

}
